package xin.alum.aim.websocks;

import io.netty.channel.Channel;
import io.netty.handler.codec.http.FullHttpRequest;
import io.netty.handler.codec.http.FullHttpResponse;

/**
 * WebSocket 握手处理
 *
 * @auther alum(alum @ live.cn)
 * @date 2021/8/4 20:08
 */
public interface WebSocketHandShake {
    /**
     * 客户端请求握手，返回true则upgrage否则返回不支持
     *
     * @param ch
     * @param req
     * @return
     */
    boolean onHandShake(Channel ch, FullHttpRequest req, FullHttpResponse httpResponse);
}
